/*
Copyright (C) 2009-2010 Xanadu Development Team

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#pragma once

#include <string>

class Players;
class Player;
class Timer;
class Channel;
class Party;

class Event {
private:
	bool party, deleted;
	string name;
	Players* players;
	Channel* channel;
	Party* rparty;
	Timer* timer;
public:
	Event(Channel* channel, string name);
	~Event();
	void deleteEvent(Channel *channel, string name);
	void start(Player* player);
	void end(bool timer = false);
	void end(Player* player, bool timer = false);
	Players* getPlayers() {
		return players;
	}
	string& getName() {
		return name;
	}
	int getTime();
	void setParty(Party* party) {
		rparty = party;
		this->party = true;
	}
	bool getParty() {
		return party;
	}
	void setDeleted(bool b) {
		deleted = b;
	}
	bool getDeleted() {
		return deleted;
	}
	Channel *getChannel() {
		return channel;
	}
	int getId() {
		return id;
	}
	int setId() {
		id++;
		return id;
	}
	static unsigned int id;
	void setTimer(Timer* timer);
	Timer* getTimer();
};
